NO
action

troca troca ui q loucura (rune)

Por notle2012, 19 de mar. de 2013 em Actions e Talkactions

rune
runes
otserver
poketibia
854
860
otserv
tibia
script
7
2.5k
notle2012N
19 de março de 2013 às 22:08

fala galera como vai vcs?

bom saindo do forno agora criei mais um sistema bem legal nome troca troca como ele funciona

vocês vai criar uma runa que assim que vc click no player vai

troca a área do player x pela a área do player y no caso vc player x

 

 

 

vai em

data\lib

entra no

050-function

coloca isso la

lembrando tem uns ot que nome é só function

function savePosition(cid)
	RETORNAR = {x = getPlayerStorageValue(cid, 20004), y = getPlayerStorageValue(cid, 20005), z = getPlayerStorageValue(cid, 20006)}
	local PLAYER = getPlayerGUID(cid)
	addEvent(function()
			if isCreature(cid) then
					setPlayerStorageValue(PLAYER, 20007, 0)
			else
					db.executeQuery("DELETE FROM `player_storage` WHERE `key` = 20003 AND `player_id` = " .. getPlayerGUID(cid) .. ";")
			end
	 end)
end

 

agora vai em

data\actions\scripts\

cria

nomedarune.lua

cola la

function onUse(cid, item, frompos, item2, topos)
rune = true -- rune infinita muda para false
if not isPlayer(item2.uid) then
   doPlayerSendTextMessage(cid,27,"click no player não em bicho")
   return true
end
if getPlayerStorageValue(cid, 20007) <= 0 then
	setPlayerStorageValue(cid, 20004, getCreaturePosition(cid).x)
	setPlayerStorageValue(cid, 20005, getCreaturePosition(cid).y)
	setPlayerStorageValue(cid, 20006, getCreaturePosition(cid).z)
	setPlayerStorageValue(cid, 20007, 1)
	savePosition(cid)
	doTeleportThing(cid,getThingPos(item2.uid))
	doPlayerSendTextMessage(cid,27,"Você Trocou De Lugar Com ["..getCreatureName(item2.uid).."]")
	doSendMagicEffect(getThingPos(cid),28)
	doSendAnimatedText(getThingPos(cid),"Troca",math.random(1,255))
if getPlayerStorageValue(cid, 20007) > 0 then
	doTeleportThing(item2.uid, RETORNAR)
	doSendMagicEffect(RETORNAR,28)
	doSendAnimatedText(RETORNAR,"Troca",math.random(1,255))
	doPlayerSendTextMessage(item2.uid,27,"["..getCreatureName(cid).."] Escolheu Você Para Troca De Lugar")
	setPlayerStorageValue(cid, 20004, 0)
	setPlayerStorageValue(cid, 20005, 0)
	setPlayerStorageValue(cid, 20006, 0)
	setPlayerStorageValue(cid, 20007, 0)
	if rune == true then
	doRemoveItem(item.uid)
end	  
return true
end
return true
end											
end

actions.xml

<action itemid="ID_DA_Rune" script="nomedarune.lua" allowfaruse="1"/>

 

mais detalhes

 

créditos

 

 

@notle2012

 

@SkyMagnum

 

@Roksas

 

 

Editado Março 19 por notle2012

19 de março de 2013 às 22:10

OMG,esse sim é bomREP+

15790911
19 de março de 2013 às 22:10

Curti..

Mais isso acho q ia dar merda se colocar no auto target kk

notle2012N
19 de março de 2013 às 22:12

Curti..

Mais isso acho q ia dar merda se colocar no auto target kk

da não pq tem que click na runa depois no player

15790911
19 de março de 2013 às 22:17

mais n tem como por na hotkey tipo "Use on Target"?

notle2012N
19 de março de 2013 às 22:21

@GuizitoG

de bot tem sim mais a rune acaba

eu deixei opção no script de deixa rune infinita se quiser tbm...

se quiser da pra adiciona um tempo pra usa

exemplo

a cada 10 segundos

Editado Março 19 por notle2012

SlicerS
19 de março de 2013 às 22:46

o script ta errado heim.. ;x

colocase 2 ifs seguidos... usar debugger eh bom... ;/